/*
 * @Author: hechengfei h349187021@163.com
 * @Date: 2022-08-10 14:58:16
 * @LastEditors: hechengfei h349187021@163.com
 * @LastEditTime: 2022-08-22 19:38:40
 * @FilePath: \xiangmu\src\components\contractmanagement\NewContract.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React, { useState } from 'react'
import '../../assets/css/contract/newcontract.css'
import { inject, observer } from 'mobx-react'
function NewContract(props) {
    const [remark, setremark] = useState('')
    const [customer_name, setcustomer_name] = useState('')
    const [contact_name, setcontact_name] = useState('')
    const [phone_number, setphone_number] = useState('')
    const [qq, setqq] = useState('')
    const [location, setlocation] = useState('')
    const customername = (e) => {
        setcustomer_name(e.target.value)
        console.log(contact_name);
    }
    const contactname = (e) => {
        setcontact_name(e.target.value)
    }
    const phonenumber = (e) => {
        setphone_number(e.target.value)
    }
    const qqnumber = (e) => {
        setqq(e.target.value)
    }
    const location1 = (e) => {
        setlocation(e.target.value)
    }
    const remark1 = (e) => {
        setremark(e.target.value)
    }
    props.contractStore.contractuserinp = {
        customer_name,
        contact_name,
        phone_number,
        qq,
        location,
        remark
    }
    return (
        <div className='newcontract'>
            <h2>基本信息</h2>
            <div><span>客户名称</span><input type="text" onChange={(e) => { customername(e) }} /></div>
            <div><span>联系人</span><input type="text" onChange={(e) => { contactname(e) }} /></div>
            <div><span>手机号码</span><input type="text" onChange={(e) => { phonenumber(e) }} /></div>
            <div><span>QQ</span><input type="text" onChange={(e) => { qqnumber(e) }} /></div>
            <div><span>所在地</span>
                <select name="" id="">
                    <option value=""></option>
                </select>
                <select name="" id="">
                    <option value=""></option>
                </select></div>
            <div><span>详细地址</span><input type="text" onChange={(e) => { location1(e) }} /></div>
            <div><span>客户类型</span>
                <select name="" id="">
                    <option value=""></option>
                </select></div>
            <div><span>客户来源</span><select name="" id="">
                <option value=""></option>
            </select></div>
            <div><span>附件</span><input type="file" name="" id="" /></div>
            <div><span>备注</span><input type="text" onChange={(e) => { remark1(e) }} /></div>
        </div>
    )
}
export default inject('contractStore')(observer(NewContract));